<%@page import="com.zhangmengyuan.medical.service.GoodsService"%>
<%@ page import="com.zhangmengyuan.medical.entity.Goods" %>
<%@page import="java.util.Date"%>
<%@page import="org.lxh.smart.File"%>
<%@page import="org.lxh.smart.SmartUpload"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
	<%SmartUpload smart = new SmartUpload();
	  smart.initialize(pageContext);
	  smart.upload();
	  System.out.println(smart.getRequest().getParameter("goodsName"));
	  Goods goods = new Goods();
		System.out.println(smart.getRequest().getParameter("classId"));
		goods.setGoodsType(Integer.parseInt(smart.getRequest().getParameter("classId")));
		goods.setSmallType(Integer.parseInt(smart.getRequest().getParameter("itemId")));
		goods.setGoodsName(smart.getRequest().getParameter("goodsName"));
		goods.setPrice(Integer.parseInt(smart.getRequest().getParameter("price")));
		goods.setNum(Integer.parseInt(smart.getRequest().getParameter("num")));
		goods.setDirection(smart.getRequest().getParameter("direction"));
		goods.setPicPath(smart.getRequest().getParameter("picPath"));
	  smart.save("upload",1);
	%>
</body>
</html>